<div class="row">
  <div class="col-lg-4 col-md-6 ml-auto mr-auto">
    <h1 class="text-center">Account</h1>

    <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
      <%= devise_error_messages! %>

      <div class="form-group">
        <%= f.text_field :name, autofocus: false, class: 'form-control', placeholder: "Full Name" %>
      </div>

      <div class="form-group">
        <%= f.email_field :email, class: 'form-control', placeholder: 'Email Address' %>
      </div>

      <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
        <div class="alert alert-warning">Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
      <% end %>

      <div class="form-group">
        <%= f.password_field :password, autocomplete: "off", class: 'form-control', placeholder: 'Password'  %>
        <p class="form-text text-muted"><small>Leave password blank if you don't want to change it</small></p>
      </div>

      <div class="form-group">
        <%= f.password_field :password_confirmation, autocomplete: "off", class: 'form-control', placeholder: 'Confirm Password'  %>
      </div>

      <div class="form-group">
        <%= f.password_field :current_password, autocomplete: "off", class: 'form-control', placeholder: 'Current Password'  %>
        <p class="form-text text-muted"><small>We need your current password to confirm your changes</small></p>
      </div>

      <div class="form-group">
        <%= f.submit "Save Changes", class: 'btn btn-lg btn-block btn-primary' %>
      </div>
    <% end %>
    <hr>

    <p class="text-center"><%= link_to "Deactivate my account", registration_path(resource_name), data: { confirm: "Are you sure? You cannot undo this." }, method: :delete %></p>
  </div>
</div>
